package org.ccay.core.orm.impl;

import javax.inject.Named;

import org.ccay.core.exception.IExceptionConverter;
import org.ccay.core.orm.DuplicateKeyException;

/**
 * Spring 重复KEY Exception转换器	
 * 
 * @since 2012-2-14
 */
@Named("IExceptionConverter.org.springframework.dao.DuplicateKeyException")
public class DuplicateKeyExceptionConverter implements IExceptionConverter {

	/* (non-Javadoc)
	 * @see org.ccay.core.exception.IExceptionConverter#convert(java.lang.Exception)
	 */
	public Throwable convert(Throwable originalException) {
		return new DuplicateKeyException(originalException);
	}

}
